.class public abstract Lorg/microemu/midp/media/BasicPlayer;
.super Ljava/lang/Object;
.source "BasicPlayer.java"

# interfaces
.implements Ljavax/microedition/media/Player;


# static fields
.field public static CONTROL_TYPE:Ljava/lang/String;


# instance fields
.field private listenersVector:Ljava/util/Vector;

.field private loopCount:I

.field private state:I

.field private timeBase:Lorg/microemu/midp/media/TimeBase;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 35
    const-string v0, "ToneControl"

    sput-object v0, Lorg/microemu/midp/media/BasicPlayer;->CONTROL_TYPE:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    .prologue
    .line 45
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 46
    new-instance v0, Ljava/util/Vector;

    invoke-direct {v0}, Ljava/util/Vector;-><init>()V

    invoke-virtual {p0, v0}, Lorg/microemu/midp/media/BasicPlayer;->setListenersVector(Ljava/util/Vector;)V

    .line 47
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lorg/microemu/midp/media/BasicPlayer;->setLoopCount(I)V

    .line 48
    const/16 v0, 0x64

    invoke-virtual {p0, v0}, Lorg/microemu/midp/media/BasicPlayer;->setState(I)V

    .line 49
    return-void
.end method


# virtual methods
.method public declared-synchronized addPlayerListener(Ljavax/microedition/media/PlayerListener;)V
    .locals 1
    .parameter "playerListener"

    .prologue
    .line 53
    monitor-enter p0

    :try_start_0
    invoke-virtual {p0}, Lorg/microemu/midp/media/BasicPlayer;->getListenersVector()Ljava/util/Vector;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 54
    monitor-exit p0

    return-void

    .line 53
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public deallocate()V
    .locals 0

    .prologue
    .line 102
    return-void
.end method

.method public getDuration()J
    .locals 2

    .prologue
    .line 82
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method protected getListenersVector()Ljava/util/Vector;
    .locals 1

    .prologue
    .line 129
    iget-object v0, p0, Lorg/microemu/midp/media/BasicPlayer;->listenersVector:Ljava/util/Vector;

    return-object v0
.end method

.method protected getLoopCount()I
    .locals 1

    .prologue
    .line 119
    iget v0, p0, Lorg/microemu/midp/media/BasicPlayer;->loopCount:I

    return v0
.end method

.method public getMediaTime()J
    .locals 2

    .prologue
    .line 87
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getState()I
    .locals 1

    .prologue
    .line 72
    iget v0, p0, Lorg/microemu/midp/media/BasicPlayer;->state:I

    return v0
.end method

.method public getTimeBase()Lorg/microemu/midp/media/TimeBase;
    .locals 1

    .prologue
    .line 92
    iget-object v0, p0, Lorg/microemu/midp/media/BasicPlayer;->timeBase:Lorg/microemu/midp/media/TimeBase;

    return-object v0
.end method

.method public prefetch()V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/microedition/media/MediaException;
        }
    .end annotation

    .prologue
    .line 106
    return-void
.end method

.method public realize()V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/microedition/media/MediaException;
        }
    .end annotation

    .prologue
    .line 110
    return-void
.end method

.method public removePlayerListener(Ljavax/microedition/media/PlayerListener;)V
    .locals 3
    .parameter "playerListener"

    .prologue
    .line 58
    invoke-virtual {p0}, Lorg/microemu/midp/media/BasicPlayer;->getListenersVector()Ljava/util/Vector;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/Vector;->elements()Ljava/util/Enumeration;

    move-result-object v0

    .line 59
    .local v0, enumeration:Ljava/util/Enumeration;
    :cond_0
    invoke-interface {v0}, Ljava/util/Enumeration;->hasMoreElements()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 61
    invoke-interface {v0}, Ljava/util/Enumeration;->nextElement()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljavax/microedition/media/PlayerListener;

    .line 62
    .local v1, listener:Ljavax/microedition/media/PlayerListener;
    if-ne v1, p1, :cond_0

    .line 64
    invoke-virtual {p0}, Lorg/microemu/midp/media/BasicPlayer;->getListenersVector()Ljava/util/Vector;

    move-result-object v2

    invoke-virtual {v2, v1}, Ljava/util/Vector;->remove(Ljava/lang/Object;)Z

    .line 68
    .end local v1           #listener:Ljavax/microedition/media/PlayerListener;
    :cond_1
    return-void
.end method

.method protected declared-synchronized setListenersVector(Ljava/util/Vector;)V
    .locals 1
    .parameter "listenersVector"

    .prologue
    .line 134
    monitor-enter p0

    :try_start_0
    iput-object p1, p0, Lorg/microemu/midp/media/BasicPlayer;->listenersVector:Ljava/util/Vector;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 135
    monitor-exit p0

    return-void

    .line 134
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized setLoopCount(I)V
    .locals 1
    .parameter "count"

    .prologue
    .line 114
    monitor-enter p0

    :try_start_0
    iput p1, p0, Lorg/microemu/midp/media/BasicPlayer;->loopCount:I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 115
    monitor-exit p0

    return-void

    .line 114
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized setMediaTime(J)J
    .locals 2
    .parameter "now"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/microedition/media/MediaException;
        }
    .end annotation

    .prologue
    .line 124
    monitor-enter p0

    const-wide/16 v0, 0x0

    monitor-exit p0

    return-wide v0
.end method

.method public declared-synchronized setState(I)V
    .locals 1
    .parameter "state"

    .prologue
    .line 77
    monitor-enter p0

    :try_start_0
    iput p1, p0, Lorg/microemu/midp/media/BasicPlayer;->state:I
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 78
    monitor-exit p0

    return-void

    .line 77
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized setTimeBase(Lorg/microemu/midp/media/TimeBase;)V
    .locals 1
    .parameter "timeBase"

    .prologue
    .line 97
    monitor-enter p0

    :try_start_0
    iput-object p1, p0, Lorg/microemu/midp/media/BasicPlayer;->timeBase:Lorg/microemu/midp/media/TimeBase;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 98
    monitor-exit p0

    return-void

    .line 97
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized start()V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/microedition/media/MediaException;
        }
    .end annotation

    .prologue
    .line 139
    monitor-enter p0

    const/16 v0, 0x190

    :try_start_0
    invoke-virtual {p0, v0}, Lorg/microemu/midp/media/BasicPlayer;->setState(I)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 140
    monitor-exit p0

    return-void

    .line 139
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized stop()V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljavax/microedition/media/MediaException;
        }
    .end annotation

    .prologue
    .line 144
    monitor-enter p0

    const/16 v0, 0x12c

    :try_start_0
    invoke-virtual {p0, v0}, Lorg/microemu/midp/media/BasicPlayer;->setState(I)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 145
    monitor-exit p0

    return-void

    .line 144
    :catchall_0
    move-exception v0

    monitor-exit p0

    throw v0
.end method
